/**
 * Copyright (c) 2016-2019 人人开源 All rights reserved.
 *
 * https://www.renren.io
 *
 * 版权所有，侵权必究！
 */

package com.cyn.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;


/**
 * 系统用户
 *
 * @author Mark sunlightcs@gmail.com
 */
@Service("redisService")
public class RedisService {

	@Autowired
	RedisTemplate<String, Object> redisTemplate;
	public void saveOrUpdate(String str){
		redisTemplate.opsForValue().set("key:"+str, str);
	}

	public String get(String str) {

		Object k = redisTemplate.opsForValue().get("k");
		return k.toString();
	}
	public Boolean getLock(){
//		return redisUtils.getLock("123",3000);
		return null;
	}

	public void unLock() {
//		redisUtils.delete("123");
	}
}
